package com.dragon.modules.yuegou.service.member;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dragon.common.web.PageRequest;
import com.dragon.modules.yuegou.entity.member.MemberCardLevelEntity;
import com.dragon.modules.yuegou.model.member.MemberCardLevel;
import com.dragon.modules.yuegou.model.member.MemberCardLevelModel;
import com.dragon.modules.yuegou.model.member.MemberGradeModel;
import com.dragon.modules.yuegou.model.member.MemberGradeSetModel;
import com.dragon.modules.yuegou.model.member.MemberInfoModel;

import java.util.List;

/**
 * 会员卡等级表 服务接口
 *
 * @author pbuilder generated
 * @date 2021-12-17 16:51:24
 * @version 2.0
 */
public interface MemberCardLevelService extends IService<MemberCardLevelEntity> {

    /**
     * 根据商圈id和会员id获取会员等级与会员权益等信息
     * @param busdId
     * @param memberId
     * @return
     */
    MemberInfoModel getMemberCardlevelInfo(String busdId, String memberId);

    /**
     * 根据商圈id和会员id获取会员等级与会员权益等信息
     * @param busdId
     * @param memberId
     * @return
     */
    MemberCardLevel getMemberCardLevel(String busdId, String memberId);

    /**
     * 根据商圈id和会员id获取会员等级与会员权益等信息
     * @param busdId
     * @param memberId
     * @param goodsId 商品ID
     * @return
     */
    MemberInfoModel getMemberCardlevelInfo(String busdId, String memberId,String goodsId);


    /**
     * 清空缓存
     * @param busdId
     * @param memberId
     */
    void evict(String busdId, String memberId);

    /**
     * 获取当前客户的所有会员等级卡
     * @param memberId
     * @return
     */
    MemberCardLevelModel memberCardList(String busdId, String memberId);

    /**
     * 获取会员卡等级预览
     * @param busdId
     * @return
     */
    List<MemberGradeModel> getMemberGrades(String busdId);

    /**
     * 获取商圈对应会员升级规则
     * @param busdId
     * @return
     */
    List<MemberGradeSetModel> getMemberGradeSets(String busdId);

    /**
     * 获取会员的会员卡等级信息
     * @param busdId
     * @param memberId
     */
    MemberCardLevel initMemberCardLevel(String busdId, String memberId);

    /**
     * 获取商圈 会员等级的会员
     * @param busdId
     * @param gradeId
     * @return
     */
    List<MemberCardLevel> memberCardLevelList(PageRequest pageInfo, String busdId, String gradeId);
}